Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(low, n)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(if_low, app'(app'(le, m), n))
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(filter2, app'(f, x)), f), x)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(add, app'(f, x)), app'(app'(map, f), xs))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(minus, x)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(high, n), x)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(low, n), x))
APP'(quicksort, app'(app'(add, n), x)) → APP'(high, n)
APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(minus, x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(low, n), x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(add, n), app'(quicksort, app'(app'(high, n), x)))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(if_high, app'(app'(le, m), n))
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(if_high, app'(app'(le, m), n)), n)
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(quot, app'(app'(minus, x), y)), app'(s, y))
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(if_low, app'(app'(le, m), n)), n)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(filter2, app'(f, x)), f)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app, app'(quicksort, app'(app'(low, n), x)))
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(filter, f)
APP'(quicksort, app'(app'(add, n), x)) → APP'(low, n)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(filter2, app'(f, x))
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(add, n), app'(app'(app, x), y))
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(add, app'(f, x))
APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(map, f), xs)
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(high, n), x))
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(filter, f)
APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(add, m), app'(app'(low, n), x))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(quot, app'(app'(minus, x), y))
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(le, m), n)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(add, x)
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(add, m), app'(app'(high, n), x))
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(le, m)
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(high, n)
APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(low, n)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(high, n)
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(app, x), y)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(le, m)
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app, x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(add, x), app'(app'(filter, f), xs))
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(app'(le, x), y)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(le, x)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(le, m), n)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(low, n)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(if_low, app'(app'(le, m), n))
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(filter2, app'(f, x)), f), x)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(add, app'(f, x)), app'(app'(map, f), xs))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(minus, x)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(high, n), x)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(low, n), x))
APP'(quicksort, app'(app'(add, n), x)) → APP'(high, n)
APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(minus, x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(low, n), x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(add, n), app'(quicksort, app'(app'(high, n), x)))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(if_high, app'(app'(le, m), n))
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(if_high, app'(app'(le, m), n)), n)
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(quot, app'(app'(minus, x), y)), app'(s, y))
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(if_low, app'(app'(le, m), n)), n)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(filter2, app'(f, x)), f)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app, app'(quicksort, app'(app'(low, n), x)))
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(filter, f)
APP'(quicksort, app'(app'(add, n), x)) → APP'(low, n)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(filter2, app'(f, x))
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(add, n), app'(app'(app, x), y))
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(add, app'(f, x))
APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(map, f), xs)
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(high, n), x))
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(filter, f)
APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(add, m), app'(app'(low, n), x))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(quot, app'(app'(minus, x), y))
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(le, m), n)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(add, x)
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(add, m), app'(app'(high, n), x))
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(le, m)
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(high, n)
APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(low, n)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(high, n)
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(app, x), y)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(le, m)
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app, x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(add, x), app'(app'(filter, f), xs))
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(app'(le, x), y)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(le, x)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(le, m), n)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(low, n)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(filter2, app'(f, x)), f), x)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(if_low, app'(app'(le, m), n))
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(add, app'(f, x)), app'(app'(map, f), xs))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(minus, x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(high, n), x)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(low, n), x))
APP'(quicksort, app'(app'(add, n), x)) → APP'(high, n)
APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(minus, x)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(add, n), app'(quicksort, app'(app'(high, n), x)))
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(low, n), x)
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(if_high, app'(app'(le, m), n)), n)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(if_high, app'(app'(le, m), n))
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(quot, app'(app'(minus, x), y)), app'(s, y))
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(if_low, app'(app'(le, m), n)), n)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(filter2, app'(f, x)), f)
APP'(quicksort, app'(app'(add, n), x)) → APP'(app, app'(quicksort, app'(app'(low, n), x)))
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(filter, f)
APP'(quicksort, app'(app'(add, n), x)) → APP'(low, n)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(filter2, app'(f, x))
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(add, n), app'(app'(app, x), y))
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(add, app'(f, x))
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(map, f), xs)
APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(high, n), x))
APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(add, m), app'(app'(low, n), x))
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(filter, f)
APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(quot, app'(app'(minus, x), y))
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(le, m), n)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(add, x)
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(add, m), app'(app'(high, n), x))
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(high, n)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(le, m)
APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(low, n)
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(high, n)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(app, x), y)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(le, m)
APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app, x)
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(add, x), app'(app'(filter, f), xs))
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(app'(le, x), y)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(le, m), n)
APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(le, x)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 8 SCCs with 38 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(app, x), y)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

APP(add(n, x), y) → APP(x, y)

R is empty.
The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))
map(x0, nil)
map(x0, add(x1, x2))
filter(x0, nil)
filter(x0, add(x1, x2))
filter2(true, x0, x1, x2)
filter2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP'(app'(app, app'(app'(add, n), x)), y) → APP'(app'(app, x), y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
APP(x1, x2)  =  APP(x1)
add(x1, x2)  =  add(x1, x2)

Lexicographic path order with status [19].
Quasi-Precedence:
add2 > APP1

Status:
APP1: [1]
add2: [1,2]


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(app'(le, x), y)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

R is empty.
The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))
map(x0, nil)
map(x0, add(x1, x2))
filter(x0, nil)
filter(x0, add(x1, x2))
filter2(true, x0, x1, x2)
filter2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP'(app'(le, app'(s, x)), app'(s, y)) → APP'(app'(le, x), y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)

Lexicographic path order with status [19].
Quasi-Precedence:
s1 > LE1

Status:
LE1: [1]
s1: [1]


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

IF_HIGH(false, n, add(m, x)) → HIGH(n, x)
HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))
map(x0, nil)
map(x0, add(x1, x2))
filter(x0, nil)
filter(x0, add(x1, x2))
filter2(true, x0, x1, x2)
filter2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
APP'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → APP'(app'(high, n), x)
The remaining pairs can at least be oriented weakly.

APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
Used ordering: Combined order from the following AFS and order.
IF_HIGH(x1, x2, x3)  =  IF_HIGH(x2, x3)
false  =  false
add(x1, x2)  =  add(x2)
HIGH(x1, x2)  =  HIGH(x1, x2)
le(x1, x2)  =  le(x1, x2)
true  =  true
s(x1)  =  s(x1)
0  =  0

Lexicographic path order with status [19].
Quasi-Precedence:
[IFHIGH2, add1, HIGH2, le2] > false
[IFHIGH2, add1, HIGH2, le2] > true

Status:
true: multiset
false: multiset
s1: [1]
0: multiset
le2: [2,1]
IFHIGH2: [1,2]
add1: [1]
HIGH2: [1,2]


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(high, n), app'(app'(add, m), x)) → APP'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

LOW(n, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))
map(x0, nil)
map(x0, add(x1, x2))
filter(x0, nil)
filter(x0, add(x1, x2))
filter2(true, x0, x1, x2)
filter2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → APP'(app'(low, n), x)
APP'(app'(low, n), app'(app'(add, m), x)) → APP'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
LOW(x1, x2)  =  LOW(x2)
add(x1, x2)  =  add(x2)
IF_LOW(x1, x2, x3)  =  x3
le(x1, x2)  =  x2
true  =  true
false  =  false
s(x1)  =  s
0  =  0

Lexicographic path order with status [19].
Quasi-Precedence:
add1 > LOW1
s > [false, 0]

Status:
true: multiset
false: multiset
LOW1: [1]
0: multiset
s: []
add1: [1]


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(high, n), x))
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(low, n), x))

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

QUICKSORT(add(n, x)) → QUICKSORT(low(n, x))
QUICKSORT(add(n, x)) → QUICKSORT(high(n, x))

The TRS R consists of the following rules:

low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(false, n, add(m, x)) → low(n, x)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_low(true, n, add(m, x)) → add(m, low(n, x))
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))
map(x0, nil)
map(x0, add(x1, x2))
filter(x0, nil)
filter(x0, add(x1, x2))
filter2(true, x0, x1, x2)
filter2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(high, n), x))
APP'(quicksort, app'(app'(add, n), x)) → APP'(quicksort, app'(app'(low, n), x))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
QUICKSORT(x1)  =  QUICKSORT(x1)
add(x1, x2)  =  add(x1, x2)
low(x1, x2)  =  x2
high(x1, x2)  =  x2
nil  =  nil
le(x1, x2)  =  le
s(x1)  =  s
0  =  0
false  =  false
if_low(x1, x2, x3)  =  x3
true  =  true
if_high(x1, x2, x3)  =  x3

Lexicographic path order with status [19].
Quasi-Precedence:
QUICKSORT1 > add2
nil > add2
le > add2
s > add2
0 > add2
false > add2
true > add2

Status:
true: multiset
false: multiset
add2: [2,1]
le: []
0: multiset
s: []
nil: multiset
QUICKSORT1: [1]


The following usable rules [14] were oriented:

app'(app'(high, n), nil) → nil
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

MINUS(s(x), s(y)) → MINUS(x, y)

R is empty.
The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))
map(x0, nil)
map(x0, add(x1, x2))
filter(x0, nil)
filter(x0, add(x1, x2))
filter2(true, x0, x1, x2)
filter2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP'(app'(minus, app'(s, x)), app'(s, y)) → APP'(app'(minus, x), y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
MINUS(x1, x2)  =  MINUS(x2)
s(x1)  =  s(x1)

Lexicographic path order with status [19].
Quasi-Precedence:
s1 > MINUS1

Status:
MINUS1: [1]
s1: [1]


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(quot, app'(app'(minus, x), y)), app'(s, y))

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

QUOT(s(x), s(y)) → QUOT(minus(x, y), s(y))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)

The set Q consists of the following terms:

minus(x0, 0)
minus(s(x0), s(x1))
quot(0, s(x0))
quot(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
quicksort(nil)
quicksort(add(x0, x1))
map(x0, nil)
map(x0, add(x1, x2))
filter(x0, nil)
filter(x0, add(x1, x2))
filter2(true, x0, x1, x2)
filter2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP'(app'(quot, app'(s, x)), app'(s, y)) → APP'(app'(quot, app'(app'(minus, x), y)), app'(s, y))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
QUOT(x1, x2)  =  QUOT(x1, x2)
s(x1)  =  s(x1)
minus(x1, x2)  =  x1
0  =  0

Lexicographic path order with status [19].
Quasi-Precedence:
s1 > QUOT2
0 > QUOT2

Status:
QUOT2: [2,1]
s1: [1]
0: multiset


The following usable rules [14] were oriented:

app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(minus, x), 0) → x



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(map, f), xs)
APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(app'(filter, f), xs)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(app'(map, f), xs)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(map, f), app'(app'(add, x), xs)) → APP'(f, x)
APP'(app'(filter, f), app'(app'(add, x), xs)) → APP'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
The remaining pairs can at least be oriented weakly.

APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(app'(filter, f), xs)
Used ordering: Combined order from the following AFS and order.
APP'(x1, x2)  =  APP'(x2)
app'(x1, x2)  =  app'(x1, x2)
map  =  map
add  =  add
filter2  =  filter2
true  =  true
filter  =  filter
false  =  false
low  =  low
nil  =  nil
high  =  high
if_high  =  if_high
le  =  le
quot  =  quot
0  =  0
s  =  s
quicksort  =  quicksort
app  =  app
minus  =  minus
if_low  =  if_low

Lexicographic path order with status [19].
Quasi-Precedence:
map > [APP'1, app'2, filter, le] > nil > [add, filter2, low, app, iflow]
map > [APP'1, app'2, filter, le] > [quot, 0] > true > [add, filter2, low, app, iflow]
map > [APP'1, app'2, filter, le] > [quot, 0] > false > [high, ifhigh] > [add, filter2, low, app, iflow]
map > [APP'1, app'2, filter, le] > [quot, 0] > s > [add, filter2, low, app, iflow]
map > [APP'1, app'2, filter, le] > quicksort > [add, filter2, low, app, iflow]
minus > [APP'1, app'2, filter, le] > nil > [add, filter2, low, app, iflow]
minus > [APP'1, app'2, filter, le] > [quot, 0] > true > [add, filter2, low, app, iflow]
minus > [APP'1, app'2, filter, le] > [quot, 0] > false > [high, ifhigh] > [add, filter2, low, app, iflow]
minus > [APP'1, app'2, filter, le] > [quot, 0] > s > [add, filter2, low, app, iflow]
minus > [APP'1, app'2, filter, le] > quicksort > [add, filter2, low, app, iflow]

Status:
quicksort: multiset
app'2: [2,1]
ifhigh: multiset
map: multiset
APP'1: [1]
app: multiset
0: multiset
s: multiset
minus: multiset
nil: multiset
add: multiset
low: multiset
true: multiset
filter: multiset
iflow: multiset
false: multiset
le: multiset
filter2: multiset
high: multiset
quot: multiset


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP'(app'(app'(app'(filter2, true), f), x), xs) → APP'(app'(filter, f), xs)
APP'(app'(app'(app'(filter2, false), f), x), xs) → APP'(app'(filter, f), xs)

The TRS R consists of the following rules:

app'(app'(minus, x), 0) → x
app'(app'(minus, app'(s, x)), app'(s, y)) → app'(app'(minus, x), y)
app'(app'(quot, 0), app'(s, y)) → 0
app'(app'(quot, app'(s, x)), app'(s, y)) → app'(s, app'(app'(quot, app'(app'(minus, x), y)), app'(s, y)))
app'(app'(le, 0), y) → true
app'(app'(le, app'(s, x)), 0) → false
app'(app'(le, app'(s, x)), app'(s, y)) → app'(app'(le, x), y)
app'(app'(app, nil), y) → y
app'(app'(app, app'(app'(add, n), x)), y) → app'(app'(add, n), app'(app'(app, x), y))
app'(app'(low, n), nil) → nil
app'(app'(low, n), app'(app'(add, m), x)) → app'(app'(app'(if_low, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_low, true), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(low, n), x))
app'(app'(app'(if_low, false), n), app'(app'(add, m), x)) → app'(app'(low, n), x)
app'(app'(high, n), nil) → nil
app'(app'(high, n), app'(app'(add, m), x)) → app'(app'(app'(if_high, app'(app'(le, m), n)), n), app'(app'(add, m), x))
app'(app'(app'(if_high, true), n), app'(app'(add, m), x)) → app'(app'(high, n), x)
app'(app'(app'(if_high, false), n), app'(app'(add, m), x)) → app'(app'(add, m), app'(app'(high, n), x))
app'(quicksort, nil) → nil
app'(quicksort, app'(app'(add, n), x)) → app'(app'(app, app'(quicksort, app'(app'(low, n), x))), app'(app'(add, n), app'(quicksort, app'(app'(high, n), x))))
app'(app'(map, f), nil) → nil
app'(app'(map, f), app'(app'(add, x), xs)) → app'(app'(add, app'(f, x)), app'(app'(map, f), xs))
app'(app'(filter, f), nil) → nil
app'(app'(filter, f), app'(app'(add, x), xs)) → app'(app'(app'(app'(filter2, app'(f, x)), f), x), xs)
app'(app'(app'(app'(filter2, true), f), x), xs) → app'(app'(add, x), app'(app'(filter, f), xs))
app'(app'(app'(app'(filter2, false), f), x), xs) → app'(app'(filter, f), xs)

The set Q consists of the following terms:

app'(app'(minus, x0), 0)
app'(app'(minus, app'(s, x0)), app'(s, x1))
app'(app'(quot, 0), app'(s, x0))
app'(app'(quot, app'(s, x0)), app'(s, x1))
app'(app'(le, 0), x0)
app'(app'(le, app'(s, x0)), 0)
app'(app'(le, app'(s, x0)), app'(s, x1))
app'(app'(app, nil), x0)
app'(app'(app, app'(app'(add, x0), x1)), x2)
app'(app'(low, x0), nil)
app'(app'(low, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_low, false), x0), app'(app'(add, x1), x2))
app'(app'(high, x0), nil)
app'(app'(high, x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, true), x0), app'(app'(add, x1), x2))
app'(app'(app'(if_high, false), x0), app'(app'(add, x1), x2))
app'(quicksort, nil)
app'(quicksort, app'(app'(add, x0), x1))
app'(app'(map, x0), nil)
app'(app'(map, x0), app'(app'(add, x1), x2))
app'(app'(filter, x0), nil)
app'(app'(filter, x0), app'(app'(add, x1), x2))
app'(app'(app'(app'(filter2, true), x0), x1), x2)
app'(app'(app'(app'(filter2, false), x0), x1), x2)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 2 less nodes.